import http from "~/utils/http";
export const buildOrder = data => {
  return http({
    url: "wx/unifiedOrder",
    method: "post",
    data
  });
};
export const buildAliOrder = params => {
  return http({
    url: "alipay/createOrder",
    method: "get",
    params
  });
};
export const checkOrderNum = data => {
  return http({
    url: "client/outTradeNo/exist",
    method: "post",
    data
  });
};
export const cardActivate = params => {
  return http({
    url: "client/card/activate",
    method: "get",
    params
  });
};

export const buildPcOrder = params => {
  return http({
    url: "wx/native/unifiedOrder",
    method: "get",
    responseType: "arraybuffer",
    params
  });
};
export const buildPcAliOrder = params => {
  return http({
    url: "alipay/precreate",
    method: "get",
    params
  });
};
export const buildH5Order = params => {
  return http({
    url: "wx/h5/unifiedOrder",
    method: "get",
    params
  });
};
export const buildAliAppOrder = data => {
  return http({
    url: "alipay/app/createOrder",
    method: "post",
    data
  });
};
export const buildWeChatAppOrder = params => {
  return http({
    url: "wx/app/unifiedOrder",
    method: "get",
    params
  });
};
